<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<%@ taglib uri="http://www.dizena.com/api/dxyfun" prefix="dxy"%>

<!DOCTYPE html>
<html lang="cn">
<head>

<!-- style start-->
<jsp:include page="../commStyle.jsp" />
<link href="${path}/static/master/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
<!-- style end-->

</head>

<body>

	<section id="container" class="">

		<!--header start-->
		<jsp:include page="../commHeader.jsp" />
		<!--header end-->


		<!--sidebar start-->
		<jsp:include page="../commNav.jsp" />
		<!--sidebar end-->


		<!--main content start-->
		<section id="main-content">
			<section class="wrapper">
				<!-- page start-->
				<div class="row">
					<div class="col-lg-12">
						<section class="panel">
							<header class="panel-heading">${title}</header>
							<div class="panel-body">
								<div style="color: red;text-align: center;height: 30px;line-height: 30px;">
									${error}
								</div>
								<div class=" form">
									<form class="cmxform form-horizontal tasi-form" id="commentForm" method="post" action="${path}/${action}">
										<input type="hidden" name="id" value="${m.id}">
										
										<div class="form-group " id="titleDiv">
										    <label for="title" class="control-label col-lg-2">标题</label>
										    <div class="col-lg-6">
										        <input class=" form-control" id="title" name="title"  value="${m.title}"  type="text"  />
										    </div>
										</div>
										<div class="form-group " id="detailDiv">
										    <label for="detail" class="control-label col-lg-2">内容</label>
										    <div class="col-lg-8">
										    	<textarea class=" form-control" id="detail" name="detail">${m.detail}</textarea>
										    </div>
										</div>
										
										<div class="form-group">
											<div class="col-lg-offset-2 col-lg-10">
												<button class="btn btn-danger" type="submit">提交</button>
												<button class="btn btn-info" type="reset" onclick="window.history.back();" >返回</button>
											</div>
										</div> 
									</form>
								</div>

							</div>
						</section>
					</div>
				</div>
				<!-- page end-->
			</section>
		</section>
		<!--main content end-->


		<!--footer start-->
		<jsp:include page="../commFooter.jsp" />
		<!--footer end-->
	</section>

	<!-- js placed at the end of the document so the pages load faster -->
	<!--script start-->
	<jsp:include page="../commScript.jsp" />
	<!--script end-->
	
	<script charset="utf-8" src="${path}/static/keditor/kindeditor-min.js"></script>
	<script charset="utf-8" src="${path}/static/keditor/zh_CN.js"></script>
	<link href="${path}/static/keditor/themes/default/default.css" rel="stylesheet" />
	<script type="text/javascript" src="${path}/static/master/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="${path}/static/master/js/bootstrap-datetimepicker.zh-CN.js"></script>
	
	<script type="text/javascript">
		KindEditor.ready(function(K) {
			K.create('textarea[id="detail"]', {
				uploadJson : "${path}/upload/upload_json.do",
				fileManagerJson : "${path}/upload/file_manager_json.do",
				allowFileManager : true
			});
		});
		
		//浮点数  input  加入： onkeyup="javascript:CheckInputFloat(this);"
		function CheckInputFloat(oInput){
			 if('' != oInput.value.replace(/\d{1,}\.{0,1}\d{0,}/,'')){
				 oInput.value = oInput.value.match(/\d{1,}\.{0,1}\d{0,}/) == null ? '' :oInput.value.match(/\d{1,}\.{0,1}\d{0,}/);
			 }
		} 
		
		$(function(){
			//
			$('.dateymd').datetimepicker({
				language : 'zh-CN',
				format : 'yyyy-mm-dd',
				todayBtn : true,
				autoclose : true,
				todayHighlight : true,
				startView : 2,
				minView : 2,
				maxView : 4,
				forceParse : true
			});
			//
		});
	</script>

</body>
</html>
